﻿using System.ServiceModel;

namespace WebApplicationHook
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IHook" in both code and config file together.
    [ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(ISubscriber))]
    public interface IHook
    {
        [OperationContract(IsOneWay = true)]
        void Publish(string channel, int taskType);

        [OperationContract(IsOneWay = true)]
        void ReceiveEmail(string channel);

        [OperationContract(IsOneWay = true)]
        void ScreenShot(string channel);

        [OperationContract]
        bool RegisterSubscriber(string channelName, string subscriberId);

        [OperationContract]
        void SendScreenShot(byte[] bytes);

        [OperationContract]
        bool UnRegisterSubscriber(string channelName, string subscriberId);
        
        [OperationContract]
        void LoadChannel();
    }

    public interface ISubscriber
    {
        [OperationContract(IsOneWay = true)]
        void Notify(int taskType);

        [OperationContract(IsOneWay = true)]
        void SendEmail();

        [OperationContract(IsOneWay = true)]
        void TakePhoto();
    }
}
